{% if feeds.count() != 0 %}
<div class="table-responsive">
    <table id="table-feeds" class="table table-striped">
        <thead>
            <tr>
                <th>#</th>
                <th>{{ _('Status') }}</th>
                <th>{{ _('Title') }}</th>
                <th>{{ _('Site') }}</th>
                <th>{{ _('Category') }}</th>
                <th>{{ _('Articles') }}</th>
                <th>{{ _('Actions') }}</th>
            </tr>
        </thead>
        <tbody>
        {% for feed in feeds %}
            <tr {% if not feed.enabled  %}class="warning"{% endif %}>
                <td>{{ loop.index }}</td>
                <td>
                    {% if feed.enabled  %}
                        <i class="fa fa-eye" aria-hidden="true" title="{{ _('Feed enabled') }}"></i>
                    {% else %}
                        <i class="fa fa-eye-slash" aria-hidden="true" title="{{ _('Feed disabled') }}"></i>
                    {% endif %}
                    {% if feed.error_count >= application.config['DEFAULT_MAX_ERROR'] %}
                        <i class="fa fa-exclamation" aria-hidden="true" title="{{ _('Feed encountered too much errors.') }}"></i>
                    {% endif %}
                </td>
                <td>{% if feed.icon_url %}<img src="{{ url_for('icon.icon', url=feed.icon_url) }}" width="16px" />&nbsp;{% endif %}<a href="{{ url_for('feed.feed', feed_id=feed.id) }}">{{ feed.title }}</a></td>
                <td><a href="{{ feed.site_link }}">{{ feed.site_link }}</a></td>
                <td>{% if None != feed.category_id and feed.category_id > 0 %}<a href="{{ url_for('category.form', category_id=feed.category_id) }}">{{ categories[feed.category_id] }}</a>{% endif %}
                </td>
                <td>( {{ unread_article_count.get(feed.id, 0) }} ) {{ article_count.get(feed.id, 0) }}</td>
                <td>
                    <a href="{{ url_for('feed.form', feed_id=feed.id) }}"><i class="fa fa-pencil-square-o" aria-hidden="true" title="{{ _('Edit this feed') }}"></i></a>
                    <a href="{{ url_for('feed.duplicates', feed_id=feed.id) }}"><i class="fa fa-book" aria-hidden="true" title="{{ _('Duplicate articles') }}"></i></a>
                    <a href="{{ url_for('feed.delete', feed_id=feed.id) }}"><i class="fa fa-times" aria-hidden="true" title="{{ _('Delete this feed') }}" onclick="return confirm('{{ _('You are going to delete this feed.') }}');"></i></a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
</div>
{% endif %}
